package com.bw.servlet;

import com.alibaba.fastjson.JSON;
import com.bw.entity.MyJson;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/***************************
 FileAction:

 CreateTime:2022-05-23 9:04
 Author:Aaking-aline
 ****************************/
@WebServlet("/LoginServlet")
public class LoginServlet extends HttpServlet {
	protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		doGet(request, response);
	}

	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		String json = "{\"features\":[{\"geometry\":{\"coordinates\":[533958.52189999819,3123489.1460000016],\"type\":\"Point\"},\"id\":1},{\"geometry\":{\"coordinates\":[533958.52189999819,3123489.1460000016],\"type\":\"Point\"},\"id\":1}]}";

		MyJson myJson = JSON.parseObject(json, MyJson.class);


		System.out.println(myJson);


	}
}
